import pybullet as p
import os
import time
import pybullet_data

client = p.connect(p.GUI)
p.setAdditionalSearchPath(pybullet_data.getDataPath()) #
planeId = p.loadURDF("plane.urdf")
startPos = [0,0,1]
startOrientation = p.getQuaternionFromEuler([0,0,0])
f_name = os.path.join('/home/archer/Work/catkin_ws/src/mm_description/urdf/urdf', 'main.urdf')
carID = p.loadURDF(fileName=f_name, basePosition=[0, 0, 0.1], physicsClientId=client)
p.setGravity(0, 0, -10, physicsClientId=client)
for _ in range(10000):
    pos, ori = p.getBasePositionAndOrientation(carID)
    p.applyExternalForce(carID, 0, [50, 0, 0], pos, p.WORLD_FRAME)
    p.stepSimulation()
    time.sleep(1. / 240.)
